package com.gaussian.property.module.biz.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * <p>
 * ics项目空间维度指标每日汇总
 * </p>
 *
 * @author songqi(13776346982)
 * @since 2024-10-03
 */

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_item_space_daily_statistics")
public class SpaceDailyStatistics implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id")
    private Integer id;

    /**
     * 统计日期
     */
    private String statisticsDate;

    public LocalDate getDate() {
        return LocalDate.parse(statisticsDate, DateTimeFormatter.ofPattern("yyyyMMdd"));
    }

    /**
     * 项目ID
     */
    private Integer itemId;

    /**
     * 项目名称
     */
    private String itemName;

    /**
     * 空间编码
     */
    private String spaceCode;

    /**
     * 项目名称
     */
    private String spaceName;

    /**
     * 风险区数量
     */
    private Integer riskAreaCount;

    /**
     * 创建时间
     */
    private LocalDateTime createdTime;

}
